//
//  RigaDettaglioEditVC.h
//  iTeVe
//
//  Created by Pedro Gonzalez on 04/03/14.
//  Copyright (c) 2014 SISI Software. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RigaDettaglio.h"
#import "ArticoliScegliVC.h"
#import "Testa.h"
#import "ListinoArticolo.h"
#import "FMDBDataAccess.h"
#import "Utility.h"

@class RigaDettaglioEditVC;

@protocol RigaDettaglioEditVCDelegate <NSObject>

- (void)rigaDettaglioEditVCDidCancel:(RigaDettaglioEditVC *)controller;
- (void)rigaDettaglioEditVC:(RigaDettaglioEditVC *)controller didEditRiga:(RigaDettaglio *)rigaDettaglio;

@end


@interface RigaDettaglioEditVC : UITableViewController <ArticoliScegliVCDelegate>

@property (weak, nonatomic) IBOutlet UIButton *btnSceglieArticolo;


@property (nonatomic, weak) NSObject<RigaDettaglioEditVCDelegate> *delegate;

@property (nonatomic, strong) Testa *modelTesta;
@property (nonatomic, strong) RigaDettaglio *modelRiga;
@property (nonatomic, strong) Articolo *modelArticolo;

@property (weak, nonatomic) IBOutlet UIBarButtonItem *btnAnnulla;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *btnConferma;


@property (weak, nonatomic) IBOutlet UIButton *sceltaArticolo;
@property (weak, nonatomic) IBOutlet UILabel *lblQuantita;
@property (weak, nonatomic) IBOutlet UILabel *lblUnitaDiMisura;
@property (weak, nonatomic) IBOutlet UILabel *lblAliquota;
@property (weak, nonatomic) IBOutlet UILabel *lblPercentuale;
@property (weak, nonatomic) IBOutlet UILabel *lblPrezzo;
@property (weak, nonatomic) IBOutlet UILabel *lblPrezzoIvato;
@property (weak, nonatomic) IBOutlet UILabel *lblSconti;
@property (weak, nonatomic) IBOutlet UILabel *lblTotali;
@property (weak, nonatomic) IBOutlet UILabel *lblTotaliIvato;

@property (weak, nonatomic) IBOutlet UITextField *tfCodiceArticolo;
@property (weak, nonatomic) IBOutlet UITextField *tfDescrizioneArticolo;
@property (weak, nonatomic) IBOutlet UITextField *tfQuantita;
@property (weak, nonatomic) IBOutlet UITextField *tfUnitaDiMisura;
@property (weak, nonatomic) IBOutlet UITextField *tfAliquota;
@property (weak, nonatomic) IBOutlet UITextField *tfPercentualeAli;
@property (weak, nonatomic) IBOutlet UITextField *tfPrezzo;
@property (weak, nonatomic) IBOutlet UITextField *tfPrezzoIvato;
@property (weak, nonatomic) IBOutlet UITextField *tfSc1;
@property (weak, nonatomic) IBOutlet UITextField *tfSc2;
@property (weak, nonatomic) IBOutlet UITextField *tfSc3;
@property (weak, nonatomic) IBOutlet UITextField *tfSc4;
@property (weak, nonatomic) IBOutlet UITextField *tfTotali;
@property (weak, nonatomic) IBOutlet UITextField *tfTotaliIvato;


@end
